← Index
NYTProf Performance Profile   
For ../prof.pl
  Run on Wed Dec 14 15:57:08 2022
Reported on Wed Dec 14 16:00:37 2022

Filename(eval 424)[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Sub/Quote.pm:3]
StatementsExecuted 280 statements in 1.88ms
Eval Invoked At/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Sub/Quote.pm line 3
Sibling evals1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1532633µs191msJSON::Schema::Modern::Document::::newJSON::Schema::Modern::Document::new
11121µs173µsJSON::Schema::Modern::Document::::BEGIN@79JSON::Schema::Modern::Document::BEGIN@79
11119µs72µsJSON::Schema::Modern::Document::::BEGIN@11.328JSON::Schema::Modern::Document::BEGIN@11.328
11112µs43µsJSON::Schema::Modern::Document::::BEGIN@74JSON::Schema::Modern::Document::BEGIN@74
11110µs41µsJSON::Schema::Modern::Document::::BEGIN@84JSON::Schema::Modern::Document::BEGIN@84
1118µs22µsJSON::Schema::Modern::Document::::BEGIN@108JSON::Schema::Modern::Document::BEGIN@108
1118µs8µsJSON::Schema::Modern::Document::::BEGIN@16.329JSON::Schema::Modern::Document::BEGIN@16.329
1116µs21µsJSON::Schema::Modern::Document::::BEGIN@87JSON::Schema::Modern::Document::BEGIN@87
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1{
223µs my $isa_check_for_evaluator = ${$_[1]->{"\$isa_check_for_evaluator"}};
311µs my $_UNQUOTED = ${$_[1]->{"\$_UNQUOTED"}};
410s my $isa_check_for_errors = ${$_[1]->{"\$isa_check_for_errors"}};
510s my $_QUOTED = ${$_[1]->{"\$_QUOTED"}};
611µs my $coerce_for_canonical_5furi = ${$_[1]->{"\$coerce_for_canonical_5furi"}};
710s my $isa_check_for_metaschema_5furi = ${$_[1]->{"\$isa_check_for_metaschema_5furi"}};
811µs my $isa_check_for_canonical_5furi = ${$_[1]->{"\$isa_check_for_canonical_5furi"}};
910s my $coerce_for_metaschema_5furi = ${$_[1]->{"\$coerce_for_metaschema_5furi"}};
10 package JSON::Schema::Modern::Document;
112112µs2125µs
# spent 72µs (19+53) within JSON::Schema::Modern::Document::BEGIN@11.328 which was called: # once (19µs+53µs) by Sub::Quote::_clean_eval at line 11
no warnings 'closure';
# spent 72µs making 1 call to JSON::Schema::Modern::Document::BEGIN@11.328 # spent 53µs making 1 call to warnings::unimport
12
# spent 191ms (633µs+190) within JSON::Schema::Modern::Document::new which was called 15 times, avg 12.7ms/call: # 8 times (297µs+57.9ms) by JSON::Schema::Modern::_get_or_load_resource at line 813 of JSON/Schema/Modern.pm, avg 7.28ms/call # 6 times (263µs+117ms) by JSON::Schema::Modern::add_schema at line 152 of JSON/Schema/Modern.pm, avg 19.5ms/call # once (73µs+15.1ms) by JSON::Schema::Modern::add_schema at line 177 of Sub/Defer.pm
sub new {
13 ($_QUOTED,$_UNQUOTED) if 0;
14# BEGIN quote_sub PRELUDE
15package JSON::Schema::Modern::Document;
16
# spent 8µs within JSON::Schema::Modern::Document::BEGIN@16.329 which was called: # once (8µs+0s) by Sub::Quote::_clean_eval at line 21
BEGIN {
1710s $^H = 2018;
1811µs ${^WARNING_BITS} = "UUUUUUUUUUUUUUUUUUUU";
19114µs %^H = (
20 );
211281µs18µs}
# spent 8µs making 1 call to JSON::Schema::Modern::Document::BEGIN@16.329
22# END quote_sub PRELUDE
23148µs my $invoker = CORE::shift();
241412µs my $class = CORE::ref($invoker) ? CORE::ref($invoker) : $invoker;
25147µs if ($class ne "JSON::Schema::Modern::Document") {
26 if ($Moo::MAKERS{$class}) {
27 if ($Moo::MAKERS{$class}{constructor}) {
28 package JSON::Schema::Modern::Document;
29 return $invoker->SUPER::new(@_);
30 }
31 Moo->_constructor_maker_for($class);
32 return $invoker->new(@_);
33 } elsif ($INC{"Moose.pm"} and my $meta = Class::MOP::get_metaclass_by_name($class)) {
34 return $meta->new_object(
35 $class->can("BUILDARGS") ? $class->BUILDARGS(@_)
36 : $class->Moo::Object::BUILDARGS(@_)
37 );
38 }
39 }
40 my $args = scalar @_ == 1
41 ? CORE::ref $_[0] eq 'HASH'
421453µs ? { %{ $_[0] } }
43 : Carp::croak("Single parameters to new() must be a HASH ref"
44 . " data => ". $_[0])
45 : @_ % 2
46 ? Carp::croak("The new() method for $class expects a hash reference or a"
47 . " key/value list. You passed an odd number of arguments")
48 : {@_}
49 ;
501428µs if (my @missing = grep !exists $args->{$_}, "schema") {
51 Carp::croak("Missing required arguments: ".CORE::join(', ', sort @missing));
52 }
531478µs28117µs my $new = $invoker->JSON::Schema::Modern::Document::SUPER::new($class->FOREIGNBUILDARGS(@_));
# spent 99µs making 14 calls to Mojo::JSON::Pointer::new, avg 7µs/call # spent 18µs making 14 calls to JSON::Schema::Modern::Document::FOREIGNBUILDARGS, avg 1µs/call
5461µs(exists $args->{"canonical_uri"} and ($new->{"canonical_uri"} = scalar do { my $value = do {
55617µs local $Method::Generate::Accessor::CurrentAttribute = {
56 init_arg => "canonical_uri",
57 name => "canonical_uri",
58 step => "coercion",
59 };
6066µs (my $_return),
61 (my $_error), (my $_old_error = $@);
6266µs (eval {
63 ($@ = $_old_error),
64 ($_return =
65619µs6102µs$coerce_for_canonical_5furi->($args->{"canonical_uri"})),
66 1
67 } or
68 $_error = CORE::ref $@ ? $@ : "coercion for \"canonical_uri\" failed: ".$@);
6963µs ($@ = $_old_error),
70 (defined $_error and CORE::die $_error);
7167µs $_return;
72}
73;
7432175µs2091µs
# spent 43µs (12+31) within JSON::Schema::Modern::Document::BEGIN@74 which was called: # once (12µs+31µs) by Sub::Quote::_clean_eval at line 74
(do { no warnings "void"; package Type::Tiny; ((((Scalar::Util::blessed($value) and $value->isa(q[Mojo::URL]))) && (do { local $_ = $value; not defined $_->fragment }))) or Type::Tiny::_failed_check($isa_check_for_canonical_5furi, "__ANON__", $value, "attribute_name","canonical_uri","attribute_step","isa check","mgaca","0","varname","\$args->{\"canonical_uri\"}"); $value }),
# spent 43µs making 1 call to JSON::Schema::Modern::Document::BEGIN@74 # spent 31µs making 1 call to warnings::unimport # spent 11µs making 6 calls to Mojo::URL::fragment, avg 2µs/call # spent 4µs making 6 calls to Scalar::Util::blessed, avg 667ns/call # spent 2µs making 6 calls to UNIVERSAL::isa, avg 333ns/call
75 $value
76}
77)),
78(exists $args->{"errors"} and ($new->{"errors"} = scalar do { my $value = $args->{"errors"};
792247µs2325µs
# spent 173µs (21+152) within JSON::Schema::Modern::Document::BEGIN@79 which was called: # once (21µs+152µs) by Sub::Quote::_clean_eval at line 79
(do { no warnings "void"; package Type::Tiny; (do { package Type::Tiny; (Ref::Util::XS::is_plain_arrayref($value)) and do { my $ok = 1; for my $i (@{$value}) { ($ok = 0, last) unless (Scalar::Util::blessed($i) and $i->isa(q[JSON::Schema::Modern::Error])) }; $ok } }) or Type::Tiny::_failed_check($isa_check_for_errors, "ArrayRef[InstanceOf[\"JSON::Schema::Modern::Error\"]]", $value, "attribute_name","errors","attribute_step","isa check","mgaca","0","varname","\$args->{\"errors\"}"); $value }),
# spent 173µs making 1 call to JSON::Schema::Modern::Document::BEGIN@79 # spent 152µs making 1 call to warnings::unimport
80 $value
81}
82)),
832867µs1416µs(exists $args->{"evaluator"} and (do { Scalar::Util::weaken($new->{"evaluator"} = scalar do { my $value = $args->{"evaluator"};
# spent 16µs making 14 calls to Scalar::Util::weaken, avg 1µs/call
8444203µs30111µs
# spent 41µs (10+31) within JSON::Schema::Modern::Document::BEGIN@84 which was called: # once (10µs+31µs) by Sub::Quote::_clean_eval at line 84
(do { no warnings "void"; package Type::Tiny; ((Scalar::Util::blessed($value) and $value->isa(q[JSON::Schema::Modern]))) or Type::Tiny::_failed_check($isa_check_for_evaluator, "InstanceOf[\"JSON::Schema::Modern\"]", $value, "attribute_name","evaluator","attribute_step","isa check","mgaca","0","varname","\$args->{\"evaluator\"}"); $value }),
# spent 41µs making 1 call to JSON::Schema::Modern::Document::BEGIN@84 # spent 31µs making 1 call to warnings::unimport # spent 20µs making 14 calls to Scalar::Util::blessed, avg 1µs/call # spent 19µs making 14 calls to UNIVERSAL::isa, avg 1µs/call
85 $value
86}
8716165µs236µs
# spent 21µs (6+15) within JSON::Schema::Modern::Document::BEGIN@87 which was called: # once (6µs+15µs) by Sub::Quote::_clean_eval at line 87
); no warnings 'void'; $new->{"evaluator"} })),
# spent 21µs making 1 call to JSON::Schema::Modern::Document::BEGIN@87 # spent 15µs making 1 call to warnings::unimport
88(exists $args->{"metaschema_uri"} and ($new->{"metaschema_uri"} = scalar do { my $value = do {
89 local $Method::Generate::Accessor::CurrentAttribute = {
90 init_arg => "metaschema_uri",
91 name => "metaschema_uri",
92 step => "coercion",
93 };
94 (my $_return),
95 (my $_error), (my $_old_error = $@);
96 (eval {
97 ($@ = $_old_error),
98 ($_return =
99$coerce_for_metaschema_5furi->($args->{"metaschema_uri"})),
100 1
101 } or
102 $_error = CORE::ref $@ ? $@ : "coercion for \"metaschema_uri\" failed: ".$@);
103 ($@ = $_old_error),
104 (defined $_error and CORE::die $_error);
105 $_return;
106}
107;
1082163µs236µs
# spent 22µs (8+14) within JSON::Schema::Modern::Document::BEGIN@108 which was called: # once (8µs+14µs) by Sub::Quote::_clean_eval at line 108
(do { no warnings "void"; package Type::Tiny; ((Scalar::Util::blessed($value) and $value->isa(q[Mojo::URL]))) or Type::Tiny::_failed_check($isa_check_for_metaschema_5furi, "InstanceOf[\"Mojo::URL\"]", $value, "attribute_name","metaschema_uri","attribute_step","isa check","mgaca","0","varname","\$args->{\"metaschema_uri\"}"); $value }),
# spent 22µs making 1 call to JSON::Schema::Modern::Document::BEGIN@108 # spent 14µs making 1 call to warnings::unimport
109 $value
110}
111)),
112(exists $args->{"schema"} and ($new->{"schema"} = $args->{"schema"})),
113 (($args)[0]->{__no_BUILD__} or (
11414192µs140s $new->JSON::Schema::Modern::Document::BUILD($args),
# spent 185ms making 14 calls to JSON::Schema::Modern::Document::BUILD, avg 13.2ms/call, recursion: max depth 1, sum of overlapping time 185ms
115 )),
116 return $new;
117 }
11811µs $$_UNQUOTED = \&new;
119}
12017µs1;
121
122;